from django.db import models


# Create your models here.
class StudentsManager(models.Manager):
    pass


class TokenManager(models.Manager):
    pass


class Students(models.Model):

    name = models.CharField(max_length=100)
    sex = models.BooleanField(default=1,)
    age = models.IntegerField()
    class_null = models.CharField(max_length=5)
    description = models.TextField(max_length=100)

    class Meta:
        db_table = "tb_student"
        verbose_name = "学生"
        verbose_name_plural = verbose_name

    studentsmanger = StudentsManager()

class StudentsToken(models.Model):
    studentsid = models.OneToOneField(Students, unique=True, on_delete=models.CASCADE)
    token = models.CharField(max_length=256)

    tokenmanger = TokenManager()
